how to establish relationship between two tables